环境准备 centos7.2
1、yum install docker-ce.x86_64 -y
安装完后
执行
systemctl enable docker
2、替换docker镜像保存目录与日志
- systemctl restart docker
-
vim /etc/docker/daemon.json
{ "registry-mirrors": ["https://registry.docker-cn.com"], "graph":"/data/tools/docker", "log-driver": "json-file", "log-opts": { "max-size": "10m" } }
-
如果存在/etc/sysconfig/docker 编辑内容:
OPTIONS='--selinux-enabled --signature-verification=false'
3、启动docker
systemctl daemon-reload
systemctl start docker
4、查看docker运行状态
systemctl status docker
5、安装docker-compose
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。